<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInLeft" style="height: calc(100% - 40px)">
    <div data-th-replace="common/functionDepict"></div>

    <input hidden id="classesId" th:value="${classes['id']}"/>
    <input hidden id="subjectIds" th:value="${classes['subjectIds']}"/>
    <input hidden id="name" th:value="${classes['name']}"/>

    <div class="testPaper-main" style="padding-right: 0;padding-left: 220px;">
        <div class="tabs-container">
            <ul class="nav nav-tabs wNav-tabs">
                <li id="onePage" class="active"><a class="fs14" data-toggle="tab" href="#tab-1" aria-expanded="true">班级详情</a></li>
                <li class="classesLetter"><a class="fs14" data-toggle="tab" href="#tab-2" aria-expanded="false">班级通知列表</a></li>
                <li class="classesTask"><a class="fs14" data-toggle="tab" href="#tab-3" aria-expanded="false">班级作业</a></li>
                <li class="classesTopic"><a class="fs14" data-toggle="tab" href="#tab-4" aria-expanded="false">班级话题</a></li>
            </ul>
            <div class="tab-content">
                <div id="tab-1" class="tab-pane active">
                    <div class="panel-body clearfix">
                        <h2 class="m-b"><span class="fs18"
                                              th:text="${#strings.concat('班级名称：', classes['name'])}"></span></h2>

                        <div class="ibox-title">
                            <div class="row">
                                <div class="col-sm-2">
                                    <h5>
                                        <a th:href="@{'/admin/classes/initUpdate?id='+${classes['id']}+'&step=2'}">
                                            <span>
                                                <button class="btn btn-white" data-toggle="tooltip" data-placement="top"
                                                        data-original-title="刷新班级成员"><i
                                                        class="fa fa-refresh"></i> 刷新</button>
                                            </span>
                                        </a>
                                        <span>
                                            <small class="fs12 c-333">共（<span id="count"></span>名成员)</small>
                                        </span>
                                    </h5>
                                </div>

                                <!-- 搜索 -->
                                <div class="col-sm-2">
                                    <form id="search-form" role="form" class="search-form">
                                        <div class="input-group opSearchBox" style="display: inline-table;">
                                            <input placeholder="手机/邮箱/登录名" name="search"
                                                   class="input-sm form-control vam common-search-word">
                                            <span class="input-group-btn">
                                                <button type="button" id="btn1"
                                                        class="btn btn-sm btn-primary vam">搜索</button>
                                            </span>
                                        </div>
                                    </form>
                                </div>

                                <div class="col-sm-2 text-center">
                                    <a href="javascript:void(0)" id="advSearchshowBtn" class="pt10 inlineBlock vam">高级搜索操作
                                        <i class="fa fa-angle-double-down"></i></a>
                                </div>

                                <div class="col-sm-2 text-center" id="classes-member-import">
                                    <a href="javascript:void(0);">
                                        <button type="button" class="btn btn-block btn-danger"><i
                                                class="fa fa-arrow-circle-o-down"></i> 导入学员
                                        </button>
                                    </a>
                                </div>
                                <div class="col-sm-2 text-center" id="bellBatch">
                                    <a href="javascript:void(0);">
                                        <button type="button" class="btn btn-block btn-danger"><i
                                                class="fa fa-paper-plane-o"></i> 发送私信
                                        </button>
                                    </a>
                                </div>

                                <div class="col-sm-2 text-center" id="classes-homework-arrange"
                                     th:if="${classes['classesType']} == 1">
                                    <a href="javascript:void(0);">
                                        <button type="button" class="btn btn-block btn-danger"><i
                                                class="fa fa-plus-circle"></i> 布置作业
                                        </button>
                                    </a>
                                </div>
                            </div>
                        </div>

                        <!-- 高级操作 -->
                        <div class="oc-advSearch-box">
                            <div class="row">
                                <div class="col-sm-4">
                                    <div class="pt10">
                                        <div class="checkbox i-checks">
                                            <label style="padding-left: 0"><input id="all-select" type="checkbox"/>
                                                <i></i> 全选</label>
                                            <button type="button" id="frozenBatch" class="btn btn-xs btn-primary ml5">
                                                批量封禁
                                            </button>
                                            <button type="button" id="historyBatch" class="btn btn-xs btn-primary ml5">
                                                批量恢复
                                            </button>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-sm-8">
                                    <div class="pt10">
                                        <form role="form" class="form-inline search-form">
                                            <div class="form-group form-box" style="margin-bottom: 10px">
                                                <input placeholder="手机/邮箱/登录名"
                                                       class="input-sm form-control vam common-search-word" type="text">
                                            </div>
                                            <button class="btn btn-w-m btn-primary" id="btn2" type="button"
                                                    style="margin-bottom: 10px">搜索
                                            </button>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 数据区 -->
                        <section class="oc-ibox-content" id="oc-ibox-content"></section>
                    </div>
                </div>
                <div id="tab-2" class="tab-pane">
                    <div class="panel-body">
                        <div class="ibox-title">
                            <div class="row">
                                <div class="col-sm-3">
                                    <h5>
                                        <a class="refreshClassesLetter">
                                            <span>
                                                <button class="btn btn-white" data-toggle="tooltip" data-placement="top"
                                                        data-original-title="刷新班级私信"><i
                                                        class="fa fa-refresh"></i> 刷新</button>
                                            </span>
                                        </a>
                                    </h5>
                                </div>

                                <!-- 搜索 -->
                                <div class="col-sm-6">
                                    <form role="form" class="search-form-two">
                                        <div class="input-group opSearchBox" style="display: inline-table;">
                                            <input placeholder="内容" name="context"
                                                   class="input-sm form-control vam common-search-word">
                                            <span class="input-group-btn">
                                                <button type="button" class="btn btn-sm btn-primary vam">搜索</button>
                                            </span>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>

                        <section class="oc-ibox-content" id="oc-ibox-letter"></section>


                    </div>
                </div>

                <div id="tab-3" class="tab-pane">
                    <div class="panel-body">
                        <div class="ibox-title">
                            <div class="row">
                                <div class="col-sm-5">
                                    <h5>
                                        <a class="refreshClassesTask">
                                            <span>
                                                <button class="btn btn-white" data-toggle="tooltip" data-placement="top" data-original-title="刷新作业列表">
                                                    <i class="fa fa-refresh"></i> 刷新作业列表
                                                </button>
                                            </span>
                                        </a>
                                        <small>（共 <span id="count3"></span> 个作业）</small>
                                    </h5>
                                </div>
                                <div class="col-sm-5">
                                    <form role="form" class="form-inline search-form3">
                                        <select name="status" class="form-control mb10">
                                            <option value="">作业状态</option>
                                            <option value="0">未发布</option>
                                            <option value="1">已发布</option>
                                            <option value="2">已禁用</option>
                                        </select>
                                        <div class="form-group form-box" style="margin-bottom: 10px">
                                            <input placeholder="请输入想要查找作业名称" class="form-control common-search-word" type="text" name="name">
                                        </div>
                                        <button class="btn btn-w-m btn-primary" type="button" style="margin-bottom: 10px" id="btn4">搜索</button>
                                    </form>
                                </div>
                                <div class="col-sm-2 text-center">
                                    <a th:href="@{/admin/examination/paper/initAddTask}">
                                        <button id="saveTaskType" type="button" class="btn btn-block btn-danger"><i class="fa fa-plus-circle"></i> 新建作业</button>
                                    </a>
                                </div>
                            </div>
                        </div>

                        <div class="oc-advSearch-box">
                            <div class="row">
                                <div class="col-sm-4">
                                    <div class="pt10">
                                        <div class="checkbox i-checks">
                                            <!--<label style="padding-left: 0"><input type="checkbox" id="all-select"> <i></i> 全选</label>-->
                                            <!--<button type="button" id="publishBatch" class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量发布"><i class="fa fa-arrow-up"></i></button>-->
                                            <!--<button type="button" id="frozenBatch"  class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量禁用"><i class="fa fa-unlock-alt"></i></i></button>-->
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="oc-task-content" id="oc-task-content"></div>
                    </div>
                </div>

                <div id="tab-4" class="tab-pane">
                    <div class="panel-body">
                        <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <div class="row">
                                <div class="col-sm-5">
                                    <h5>
                                        <a class="refreshClassesTopic">
                                <span>
                                    <button class="btn btn-white" data-toggle="tooltip" data-placement="top" data-original-title="刷新话题列表">
                                        <i class="fa fa-refresh"></i> 刷新
                                    </button>
                                </span>
                                        </a>
                                        <small >（共 <span id="count4"></span> 个话题）</small>
                                    </h5>
                                </div>
                                <div class="col-sm-5">
                                    <form role="form" class="form-inline search-form4">
                                        <select name="classify" class="form-control mb10">
                                            <option value="">话题分类</option>
                                            <option th:each="classify : ${classifies}" th:value="${classify['key']}" th:text="${classify['value']}"></option>
                                        </select>
                                        <select name="status" class="form-control mb10">
                                            <option value="">话题状态</option>
                                            <option value="1">正常</option>
                                            <option value="2">禁用</option>
                                        </select>
                                        <div class="form-group form-box" style="margin-bottom: 10px">
                                            <input placeholder="请输入想要查找话题标题" class="form-control common-search-word" type="text">
                                        </div>
                                        <button class="btn btn-w-m btn-primary" type="button" style="margin-bottom: 10px" id="btnTopic">搜索</button>
                                    </form>
                                </div>
                                <div class="col-sm-2 text-center">
                                    <a>
                                        <button id="saveTaskType4" type="button" class="btn btn-block btn-danger"><i class="fa fa-plus-circle"></i> 新建话题 </button>
                                    </a>
                                </div>
                            </div>
                        </div>

                        <div class="oc-advSearch-box">
                            <div class="row">
                                <div class="col-sm-4">
                                    <div class="pt10">
                                        <div class="checkbox i-checks">
                                            <label style="padding-left: 0"><input type="checkbox" id="all-select4"> <i></i> 全选</label>
                                            <button type="button" id="publishBatch" class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量恢复"><i class="fa fa-history"></i></button>
                                            <button type="button" id="frozenBatch4"  class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量禁用"><i class="fa fa-unlock-alt"></i></button>
                                            <button type="button" id="deleteBatch" class="btn btn-xs btn-primary ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="批量删除"><i class="fa fa-trash"></i></button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="oc-topic-content" id="oc-topic-content"></div>
                    </div>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <!-- 左侧内容区 -->
    <div class="tp-marking-right-bx" style="right: inherit;left: 20px;">
        <div class="tm-mrb-bx">
            <div class="m-l m-r m-b">
                <div class="text-center">
                    <div class="m-b-sm m-t-lg">
                        <img class="img-circle" id="class_img" width="100%" height="100%" style="max-width: 100px"
                             th:src="${classes['imageMap']['pcUrlMap']['small']}">
                        <a id="upload_img" title="修改班级封面" style="position: relative;top: 40px;"><i
                                class="fa fa-cog fs18"></i></a>
                    </div>
                    <th:block th:if="!${#lists.isEmpty(classes['subjectList'])}">
                        <p class="font-bold" th:each="subject,subIndex : ${classes['subjectList']}">
                            <th:block th:text="${subject['subjectName']}+'/'"></th:block>
                            <th:block th:if="!${#lists.isEmpty(subject['childSubjectList'])}"
                                      th:each="child,index : ${subject['childSubjectList']}">
                                <th:block th:if="${index.last} == false" th:text="${child['subjectName']}+'/'"></th:block>
                                <th:block th:if="${index.last} == true" th:text="${child['subjectName']}"></th:block>
                            </th:block>
                            <th:block th:if="${#lists.isEmpty(subject['childSubjectList'])}">全部科目</th:block>
                            <th:block th:if="${subIndex.last}==false" th:utext="'<br/>'"></th:block>
                        </p>
                    </th:block>
                    <th:block th:if="${#lists.isEmpty(classes['subjectList'])}">
                        <p class="font-bold">全部专业</p>
                    </th:block>
                </div>
                <hr>

                <div id="teacher_list">
                    <h6><span class="fs14 c-333">班主任：</span></h6>
                    <p class="m-l clearfix " th:each="member : ${classes['memberList']}"
                       th:if="${member['identity'] == 3}">
                        <a href="#" class="pull-right fs12 c-999" th:attrappend="data-id=${member['id']}" title="删除"><i
                                class="fa fa-close"></i></a>
                        <a href="javascript:void(0);" class="c-master fs12"
                           th:text="${member['member']['teacherName']}"></a>
                    </p>
                    <p class="m-l clearfix" th:if="${#lists.isEmpty(classes['memberList'])}">
                        暂无讲师
                    </p>
                </div>

                <div class="m-t-md">
                    <h6><a id="editBrief" title="修改班级封面"><i class="fa fa-cog fs18"></i></a>
                        <span class="fs14 c-333">班级介绍：</span></h6>
                    <div class="well m-t" style="padding: 10px;">
                        <span id="summary" class="fs12 c-999" style="display: block;max-height: 100px;overflow: hidden"
                              th:text="${classes['summary']}"></span>
                    </div>
                </div>

                <div>
                    <h6><span class="fs14 c-333">服务课程：</span></h6>
                    <p class="m-l">
                        <a th:if="${classes['classesType']}==1 and !${#maps.isEmpty(classes['course'])}"
                           href="javascript:void(0);" class="c-master fs12"
                           th:text="${classes['course']['courseName']}"></a>
                        <a th:if="${classes['classesType']}==2 or ${#maps.isEmpty(classes['course'])}"
                           href="javascript:void(0);" class="c-master fs12">—</a>
                    </p>
                </div>
            </div>
        </div>
    </div>
</div>
    <div data-th-replace="layout/head-footer"></div>
    <script type="text/javascript" th:src="@{{path}/admin/business/upload/common-webuploader.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/user/user/select_common_user.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/classes/member/classes-member.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/classes/member/classes-letter.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/classes/task/classes-task-list.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/classes/topic/classes-topic-list.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>
</html>
